<?php
return array(
	'searchColumns' => array(
		'worker_id' => array(
			'dropDownList', Yii::app()->enum->options('worker.providerAndDealer'),
			'visible' => 'Yii::app()->adminUser->role == AdminUser::ROLE_OPERATOR',
		),
		'host'
	),
	'dataColumns' => array(
		'id',
		array(
			'name' => 'worker.worker_name',
			'visible' => Yii::app()->adminUser->role == AdminUser::ROLE_OPERATOR,
		),
		'host',
		array(
			'name' => 'status',
			'value' => '$data->stateHandle->lookup()'
		),
		array(
			'header' => '操作',
			'class' => 'ButtonColumn',
			'stateHandles' => array(
				'stateHandle',
			),
		),
	),
	'operates' => 
		Yii::app()->adminUser->role != AdminUser::ROLE_DEALER 
		|| 
		!Website::model()->findByAttributes(array('worker_id'=>Yii::app()->adminUser->id))
		? array() : false,
	'_import' => array(
		array('*', 'actions.admin//*'),
	),
);
?>